package andytest;

import static org.junit.Assert.*;

import java.text.SimpleDateFormat;

import org.junit.Test;

import uk.ac.glasgow.demosocs.Election;
import uk.ac.glasgow.demosocs.impl.VotingSystemStub;
import uk.ac.glasgow.demosocs.impl.election.ElectionImpl;

public class systemStorageTest {
	VotingSystemStub sys ;
	SimpleDateFormat format ;

	public void setUp() throws Exception {
		sys = new VotingSystemStub();
		format = new SimpleDateFormat("yyyy/MM/dd");

	}
	
	public void test1(){
		sys.setCurrentUser("321", "password2");
		sys.createElection("Name1", "Type1");
		assertTrue(sys.getCurrentElection().getEID().equals("1"));
		for(Election ele : sys.getElections())
			System.out.println(ele.getEID());
	}
}
